Skip to content

Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool#2683

Merged
Keavon merged 22 commits intomasterfrom
shapes-refactor
Jun 22, 2025
Merged

Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool#2683
Keavon merged 22 commits intomasterfrom
shapes-refactor

Conversation

@0SlowPoke0
Copy link
Copy Markdown
Collaborator

@0SlowPoke0 0SlowPoke0 commented Jun 1, 2025

Replaced the existing Line, Rectangle, Ellipse, and Polygon tools with a unified Shape Tool that supports the creation of all these shapes from a single interface. The old Line, Rectangle, and Ellipse tools have been aliased to use the new Shape Tool. In addition to shape creation, the new tool also supports modifying the shapes it creates.

Closes #2618, closes #1715

@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 1, 2025 20:57 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 1, 2025 21:04 Inactive
@0SlowPoke0 0SlowPoke0 marked this pull request as draft June 1, 2025 21:09
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 3, 2025 19:18 Inactive
@Keavon Keavon changed the title Refactor Line, Rectangle, Ellipse, and Polygon Tools into a Unified Shape Tool Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool Jun 4, 2025
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 18:57 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 20:08 Inactive
@Keavon Keavon force-pushed the shapes-refactor branch from a9ccfe7 to b5f87ad Compare June 7, 2025 20:44
@Keavon Keavon force-pushed the shapes-refactor branch 2 times, most recently from f4f1232 to f7a870a Compare June 7, 2025 20:49
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 20:54 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 21:08 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 21:16 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 7, 2025 21:23 Inactive
@github-actions github-actions bot requested a deployment to graphite-dev (Preview) June 12, 2025 18:32 Abandoned
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 15, 2025 17:34 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 19, 2025 06:57 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 19, 2025 07:05 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 19, 2025 07:15 Inactive
@Keavon Keavon force-pushed the master branch 2 times, most recently from 34dced3 to 5cacab2 Compare June 20, 2025 06:47
@Keavon Keavon force-pushed the shapes-refactor branch from 738023c to fd9d35d Compare June 20, 2025 06:58
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 20, 2025 08:05 Inactive
@Keavon Keavon changed the title Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool and add gizmos Jun 22, 2025
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 22, 2025 07:18 Inactive
@Keavon Keavon force-pushed the shapes-refactor branch from 4f71b2b to 7105e33 Compare June 22, 2025 07:20
@Keavon
Copy link
Copy Markdown
Member

Keavon commented Jun 22, 2025

Issues to address in followup work:

  • After drawing any shape (except Line, apparently), or even after just hovering over the transform cage to change the cursor appearance, the crosshair cursor goes back to the regular mouse pointer. It doesn't return to the crosshair like it's supposed to indicating it will draw the next shape. (A regular mouse pointer, not a crosshair, is desired over the point radius handle gizmos.)
  • Dragging a polygon or star's radius point gizmos happens at an accelerated/slowed pace rather than staying with your cursor as you drag, if that shape has a Transform node scale other than 1x.

@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 22, 2025 07:23 Inactive
@Keavon Keavon changed the title Refactor the Line, Rectangle, Ellipse, and Polygon tools into a unified Shape tool and add gizmos Refactor the separate shape drawing tools into a unified Shape tool and add gizmos for star/polygon Jun 22, 2025
@Keavon Keavon force-pushed the shapes-refactor branch from 7105e33 to 0813643 Compare June 22, 2025 07:44
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) June 22, 2025 07:47 Inactive
@Keavon Keavon changed the title Refactor the separate shape drawing tools into a unified Shape tool and add gizmos for star/polygon Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool Jun 22, 2025
@Keavon Keavon merged commit 8e5abf6 into master Jun 22, 2025
4 checks passed
@Keavon Keavon deleted the shapes-refactor branch June 22, 2025 07:53
urisinger pushed a commit to urisinger/Graphite that referenced this pull request Jul 15, 2025
… into a unified Shape tool (GraphiteEditor#2683)

* no trait ,not to fix line

* add hints

* line modification even when other shapes are selected

* added transform and anchor overlays

* removed old code

* fixed transform added hints need to fix modifier keys use

* refactored select-tool

* add point-handle-gizmo

* fix rotate bug

* implement angle snapping gizmo , fix overlay and refactor the code

* implement snapping for point-handle gizmo and implement no of point gizmo need to refactor

* implemented the gizmo for polygon, added tests , brackets to increase sides

* formatting-fix

* small nit-picks

* Make it compile

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjusting the Polygon/Star tool number of points while drawing Shape tools should allow modifying their drawn shapes

2 participants